CC = g++
CFLAGS = -g -O0 -Wall
OBJECTS = versa_util.o test_master.o test_master test_client1.o test_client1 test_client2.o test_client2 
INCLUDE = /root/monalytics/evpath-install/include
LD_LIBRARY_PATH = /root/monalytics/evpath-install/lib  
#L = -levpath -lpthread -lffs -lcod -lm
L = -levpath -lpthread -lffs -ldill -lcercs_env -latl -lgen_thread -lm

all: $(OBJECTS)
test_master: test_master.o
	$(CC) -L $(LD_LIBRARY_PATH) $(L) -o /root/VersaScope/test/test_master test_master.o versa_util.o

test_master.o: test_master.cpp
	$(CC) -c $(CFLAGS) -I $(INCLUDE) test_master.cpp

test_client1: test_client1.o
	$(CC) -L $(LD_LIBRARY_PATH) $(L) -o /root/VersaScope/test/test_client1 test_client1.o versa_util.o

test_client1.o: test_client1.cpp
	$(CC) -c $(CFLAGS) -I $(INCLUDE) test_client1.cpp

test_client2: test_client2.o
	$(CC) -L $(LD_LIBRARY_PATH) $(L) -o /root/VersaScope/test/test_client2 test_client2.o versa_util.o

test_client2.o: test_client2.cpp
	$(CC) -c $(CFLAGS) -I $(INCLUDE) test_client2.cpp

versa_util.o: versa_util.cpp
	$(CC) -c $(CFLAGS) -I $(INCLUDE) versa_util.cpp

clean:
	rm -rf *o /root/VersaScope/test/test_master /root/VersaScope/test/test_client1 /root/VersaScope/test/test_client2

%.o : $.c
	$(CC) $(CFLAGS) -c $<
